#include <gtk/gtk.h>

int on_quit_event()
{
	gtk_main_quit();
	return 0;
}
int main(int argc,char *argv[])
{
	GtkWidget	*window;
	gtk_init(&argc	,&argv);
	window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
	g_signal_connect(G_OBJECT(window)	,"delete_event"	,G_CALLBACK(on_quit_event),NULL);
	gtk_window_set_title(GTK_WINDOW(window)	,"一个功能完善的窗口");
	gtk_window_set_default_size(GTK_WINDOW(window)	,500	,100);
	gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
	gtk_widget_show(window);gtk_main();
	return FALSE;
}
